layui.define(['jquery'], function(exports) {
	var $ = layui.jquery;
	
	var input = function() {
		var that = this;
		that.properties = {
			label: {
				value: '文本框',
				el: '{{label}}'
			},
			input: {
				name: 'input',
				type: 'text',				
				autocomplete: 'off',
				length: 0,   //0表示不限长度
				required: false,  //是否必填
				
			}
		};
		that.name = "文本框";
		that.createNode = function() {
			var html = '<label class="layui-form-label">单行文本框</label>' +
				'<div class="layui-input-block">' +
				'<input name="{{name}}" placeholder="这是一个输入框" type="text" class="layui-input" autocomplete="off" readonly />' +
				'</div>';				
			var ctrlDiv = document.createElement("div");
			ctrlDiv.className = "layui-form-item ays-ctrl";
			ctrlDiv.innerHTML = html;
			that.control = ctrlDiv;
			return ctrlDiv;
		}
	}
	
	exports('input', {
		create: function() {
			return new input()
		}
	});
});
